package edu.cmu.aes.project2.ws.data;

public class UserInformationServiceProxy implements edu.cmu.aes.project2.ws.data.UserInformationService {
  private String _endpoint = null;
  private edu.cmu.aes.project2.ws.data.UserInformationService userInformationService = null;
  
  public UserInformationServiceProxy() {
    _initUserInformationServiceProxy();
  }
  
  public UserInformationServiceProxy(String endpoint) {
    _endpoint = endpoint;
    _initUserInformationServiceProxy();
  }
  
  private void _initUserInformationServiceProxy() {
    try {
      userInformationService = (new edu.cmu.aes.project2.ws.data.UserInformationServiceServiceLocator()).getUserInformationServicePort();
      if (userInformationService != null) {
        if (_endpoint != null)
          ((javax.xml.rpc.Stub)userInformationService)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint);
        else
          _endpoint = (String)((javax.xml.rpc.Stub)userInformationService)._getProperty("javax.xml.rpc.service.endpoint.address");
      }
      
    }
    catch (javax.xml.rpc.ServiceException serviceException) {}
  }
  
  public String getEndpoint() {
    return _endpoint;
  }
  
  public void setEndpoint(String endpoint) {
    _endpoint = endpoint;
    if (userInformationService != null)
      ((javax.xml.rpc.Stub)userInformationService)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint);
    
  }
  
  public edu.cmu.aes.project2.ws.data.UserInformationService getUserInformationService() {
    if (userInformationService == null)
      _initUserInformationServiceProxy();
    return userInformationService;
  }
  
  public java.lang.Boolean authentication(java.lang.String arg0, java.lang.String arg1) throws java.rmi.RemoteException{
    if (userInformationService == null)
      _initUserInformationServiceProxy();
    return userInformationService.authentication(arg0, arg1);
  }
  
  public edu.cmu.aes.project2.ws.data.UserInformationDto getUserInformation(java.lang.String arg0) throws java.rmi.RemoteException{
    if (userInformationService == null)
      _initUserInformationServiceProxy();
    return userInformationService.getUserInformation(arg0);
  }
  
  
}